home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / awt / Insets.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.4 KB  |  66 lines

  1. package java.awt;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class Insets implements Cloneable, Serializable {
  6.    public int top;
  7.    public int left;
  8.    public int bottom;
  9.    public int right;
  10.    private static final long serialVersionUID = -2272572637695466749L;
  11.  
  12.    public Insets(int var1, int var2, int var3, int var4) {
  13.       this.top = var1;
  14.       this.left = var2;
  15.       this.bottom = var3;
  16.       this.right = var4;
  17.    }
  18.  
  19.    public void set(int var1, int var2, int var3, int var4) {
  20.       this.top = var1;
  21.       this.left = var2;
  22.       this.bottom = var3;
  23.       this.right = var4;
  24.    }
  25.  
  26.    public boolean equals(Object var1) {
  27.       if (!(var1 instanceof Insets)) {
  28.          return false;
  29.       } else {
  30.          Insets var2 = (Insets)var1;
  31.          return this.top == var2.top && this.left == var2.left && this.bottom == var2.bottom && this.right == var2.right;
  32.       }
  33.    }
  34.  
  35.    public int hashCode() {
  36.       int var1 = this.left + this.bottom;
  37.       int var2 = this.right + this.top;
  38.       int var3 = var1 * (var1 + 1) / 2 + this.left;
  39.       int var4 = var2 * (var2 + 1) / 2 + this.top;
  40.       int var5 = var3 + var4;
  41.       return var5 * (var5 + 1) / 2 + var4;
  42.    }
  43.  
  44.    public String toString() {
  45.       return this.getClass().getName() + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
  46.    }
  47.  
  48.    public Object clone() {
  49.       try {
  50.          return super.clone();
  51.       } catch (CloneNotSupportedException var2) {
  52.          throw new InternalError();
  53.       }
  54.    }
  55.  
  56.    private static native void initIDs();
  57.  
  58.    static {
  59.       Toolkit.loadLibraries();
  60.       if (!GraphicsEnvironment.isHeadless()) {
  61.          initIDs();
  62.       }
  63.  
  64.    }
  65. }
  66.